package net.telesing.tcmc.back.model;

/**
 * 生成返回结果
 * 
 * Created by Zmt on 2015/11/17.
 */
public class Results
{
    static String code = null;

    static String desc = null;

    public Result getRes(boolean isSuccess, String msg)
    {
        if (isSuccess)
        {
            code = "0000";
            desc = "".equals(msg) ? "success" : msg;
        }
        else
        {
            code = "1000";
            desc = "".equals(msg) ? "error" : msg;
        }
        return new Result(code, desc);
    }

}
